#ifndef CORE_GLRENDERER_H
#define CORE_GLRENDERER_H

#include <cstdio>
#include "Common/Common.h"
#include "Size.h"
#include "Color.h"
#include "Material.h"
#include "TextureIdPool.h"
#include "TextureStore.h"

namespace core {

	class Renderer {
	private:
		static Color _bgColor;
		static TextureStore _textureStore;

	public:
		static Color GetColor( );
		static void SetColor( const Color& color );
		static TextureStore GetTextureStore( );

		static void Create( const Color& bgColor );
		static void Destroy( );

		static void WindowResized( Size newSize );

		static void SetCamera( const Transform& tf, float scale );
		static void BeginDraw( );
		static void EndDraw( );

		static void Push( );
		static void Pop( );
		static void MoveTo( const Transform& transform );
		static void MoveBy( const Transform& transform );

		static void DrawPoint( const Vec3& point, const Color& color, float size = 1.0f );
		static void DrawLine( const Vec3& start, const Vec3& end, const Color& color );
		static void DrawPolygon( const ICollection<Vec3>* vertices, const Color& color );
		static void DrawPolygon( const ICollection<Vec3>* vertices, const Material& material );
		static void DrawCircle( const Vec3& center, float radius, const Color& color );
		static void DrawTexture( const Texture* texture, const Transform& transform, float width, float height );
		static void DrawTexture( const Texture* texture, const Vec3& center, float width, float height );
		static void DrawTexture( const Texture* texture, const Vec3& center, float angle, float width, float height );
	};
}
#endif
